import { createRouter, createWebHashHistory } from 'vue-router'
import GoodsDetail from '../views/GoodsDetail/index.vue'
import Cart from '../views/Cart/index.vue'

const router = createRouter({
  history: createWebHashHistory(), // hash模式
  routes: [
    { path: '/goodsdetail', component: GoodsDetail },
    { path: '/cart', component: Cart },
    { path: '/', redirect: '/goodsdetail' }
  ]
})

export default router
